package org.dreamfly.netshop.entity;

import java.util.LinkedHashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Admin entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "Address")
public class Address implements java.io.Serializable {

    // Fields
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ManyToOne(targetEntity = Member.class, fetch = FetchType.LAZY)
    @JoinColumn(name = "memberid")
    private Member member;

    @OneToMany(targetEntity = OrderInfo.class, mappedBy = "address")
    private Set<OrderInfo> OrderInfos = new LinkedHashSet<OrderInfo>(0);

    private String address;
    @Column(name = "postcode")
    private String postCode;
    private String name;
    private String mobilephone;
    private String telephone;
    @Column(name = "zonecode")
    private String zoneCode;

    // Constructors

    public Set<OrderInfo> getOrderInfos() {
        return OrderInfos;
    }

    public void setOrderInfos(Set<OrderInfo> orderInfos) {
        OrderInfos = orderInfos;
    }

    /** default constructor */
    public Address() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Member getMember() {
        return member;
    }

    public void setMember(Member member) {
        this.member = member;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPostCode() {
        return postCode;
    }

    public void setPostCode(String postCode) {
        this.postCode = postCode;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMobilephone() {
        return mobilephone;
    }

    public void setMobilephone(String mobilephone) {
        this.mobilephone = mobilephone;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public String getZoneCode() {
        return zoneCode;
    }

    public void setZoneCode(String zoneCode) {
        this.zoneCode = zoneCode;
    }

}